<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Models\Auth\User;
use Illuminate\Http\Request;

class PermissionController extends Controller
{
    public function hasPermission(Request $request, string $permission) {
        $user = User::find(auth()->id());
        return response()->json($user->hasPermission($permission));
    }
}
